Skip to content

Comments

158 Update Ruby-Sass due to EOL announcement#202

Merged
jonrandahl merged 20 commits intodevfrom
issue/158-update-ruby-sass-due-to-eol
Jan 13, 2026
Merged

158 Update Ruby-Sass due to EOL announcement#202
jonrandahl merged 20 commits intodevfrom
issue/158-update-ruby-sass-due-to-eol

Conversation

@jonrandahl
Copy link
Contributor

@jonrandahl jonrandahl commented Jan 13, 2026

Summary

Modernised asset pipeline and CSS tooling by migrating from deprecated sass-rails gem to Dart Sass via dartsass-sprockets, whilst integrating Bootstrap framework dependencies for enhanced styling capabilities and improved maintainability.

Specific to ticket #158

Changes

  • Migrated from deprecated sass-rails gem to dartsass-sprockets (Dart Sass) for long-term CSS compilation support
  • Removed bootstrap-sass in favour of Bootstrap framework dependencies for enhanced styling capabilities and maintainability
  • Updated asset pipeline configuration and loading order for improved performance
  • Enabled Autoprefixer source maps for better CSS debugging in development
  • Streamlined Rails framework loading configuration
  • Updated Sass configuration for compatibility with new build toolchain

Breaking Changes

None

Checklist

Testing

  • Unit tests added/updated
  • Manual testing completed
  • No regressions introduced

Build & Assets

  • Assets compile successfully in build step
  • Sass/CSS build chain functioning correctly
  • Remote gem loading verified locally
  • Linting passes (rubocop, eslint)

Process & Quality

  • Changelog updated
  • Documentation updated

- Ignores .DS_Store files to prevent unnecessary tracking of Mac OS system files.
- Generalises .env exclusion to cover all variations, except the development one, for better secrets management.
- Improves readability and maintainability of the Makefile.
- Introduces help target for displaying available make targets and environment variables.
- Enhances asset compilation process.
- Simplifies authentication setup.
- Clarifies target dependencies and descriptions.
- Reformats the Rails startup log message to cleanup previous whitespace
- Only appends `server.server_url` if provided
- Renames variables for better understanding
- Moves commented-out local gem paths to development group
- Prioritises loading dependencies (libraries, gems, engines) before custom application code to prevent dependency issues.
- Ensures custom application code loads last to guarantee all dependencies are available.
- Retains `require_tree .` at the end to avoid loading order conflicts.
- Removes the `sass-rails` gem.
- Addresses end-of-life status of Ruby Sass.
- Updates gems in the Gemfile to address end-of-life (EOL) status and incorporate newer versions.
- Replaces deprecated gems with actively maintained alternatives.
- Introduces Bootstrap 5 and related dependencies for improved front-end styling.
- Includes dotenv gem to manage environment variables for different environments.
- Adds dartsass-sprockets for handling Sass compilation.
- Sorts the Gemfile alphabetically for improved readability.

Relates to #158
- Configures Autoprefixer to generate source maps. This assists in debugging CSS by mapping compiled CSS back to the original Sass files.
- Registers a custom Autoprefixer processor within the Rails asset pipeline. This ensures that the source maps are correctly generated during asset compilation.
- Adapts to different Sprockets versions, using either `register_bundle_processor` or `register_postprocessor` based on the Sprockets version, ensuring compatibility across different Rails versions.
- Configures sass to improve development debugging and production performance.
- Prevents sass deprecation warnings from cluttering logs.
- Enables sass source maps in development to simplify debugging css issues.
- Compresses sass output in production to reduce file sizes.
- Clarifies the purpose of the API_SERVICE_URL environment variable.
- Reduces the number of required Rails frameworks to only those in use.
- Specifies default group for bundler to ensure environment-specific gems are loaded correctly.
- Improves application boot time by reducing unnecessary dependencies.
Applies Bootstrap grid system to improve responsiveness:

- Wraps partial renders in rows and columns for better layout control
- Improves the structure of error pages and landing pages
- Ensures consistent presentation across different screen sizes
- Updates the asset pipeline configuration to manage favicon assets.
- This ensures favicons are correctly served and referenced within the application.
- Adds Bootstrap and Popper.js to the application's JavaScript manifest.
- Supports the upgrade of Ruby Sass due to end-of-life by providing necessary front-end dependencies for Bootstrap.

specific to #158
- Suppresses Sass `@import` deprecation warnings.
- Aids migration to modern `@use` and `@forward` syntax by quieting noisy deprecation messages.
- Prevents these warnings from cluttering the console during development.
- Introduces new stylesheet files for landing pages and qonsole components.
- Refactors application.scss to import required stylesheets, addressing end-of-life concerns for ruby-sass.
- Modifies an error page to improve layout using bootstrap grid classes.

Refs #158
- Updates ruby sass dependencies due to end-of-life.
- Removes explicit `bootstrap` gem to align with `lr_common_styles` dependency.
- Updates `faraday` and related gems to the latest versions.
- Adds an `update` task to the Makefile.
- Allows interactive review and update of dependencies.
- Checks for outdated Ruby gems using `bundle outdated`.
- Checks for outdated JavaScript dependencies using `yarn upgrade-interactive` if `yarn` is installed.
- Can be ported to all projects to aide in dependency update tasks
- Created a TODO markdown file to reflect completed and pending tasks

Related specifically to #158
- Documents migration from `sass-rails` to `DartSass` for continued CSS support.
- Documents addition of Bootstrap framework dependencies for enhanced styling.
- Documents updates to asset pipeline configuration for performance improvements.
- Documents enabling Autoprefixer source maps for better CSS debugging.
- Documents streamlining of Rails framework loading configuration.
- Documents updates to Sass configuration for compatibility with new toolchain.

Ref #158
@jonrandahl jonrandahl self-assigned this Jan 13, 2026
Copy link
Contributor

@joescottdave joescottdave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonrandahl jonrandahl merged commit e0e5351 into dev Jan 13, 2026
2 checks passed
@jonrandahl jonrandahl deleted the issue/158-update-ruby-sass-due-to-eol branch January 13, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants